/* 
 * 邮件发送类使用SaeMail服务
 */
package com.itcc.dao;

/**
 *
 * @author Icer
 */
public class SendMail {

    public boolean sendMail(String username, String email, String password) {
        boolean flag = false;
        String content = "您好" + username + "，您在IT菜菜--收支管理平台注册的帐号密码为：" + password + ""
                + "<br>您可以点击这里进行登录：<a href='http://itcclshz.sinaapp.com/' target='_blank'>收支平台</a>" + ""
                + ".<br>同时，您也可以点击这里查看我们的主站：<a href='http://itcaicai.com' target='_blank'>IT菜菜</a>." + ""
                + ".<br>最后，IT菜菜祝您生活愉快，希望我们的系统能给您带来方便";
    /*    SaeMail mail = new SaeMail();
        mail.setFrom("313949302@qq.com");
        mail.setSmtpUsername("313949302");
        mail.setSmtpPassword("woaini@123");
        mail.setCc(new String[]{"hb1986ice@gmail.com"});
        mail.setTo(new String[]{email});
        mail.setSubject("IT菜菜--收支管理平台密码");
        mail.setContentType("HTML");
        mail.setContent(content);
        flag = mail.send();
        if (flag) {
            System.out.println("发送成功 用户=[" +username +"]");
        } else {
            System.out.println(mail.getErrno());
            System.out.println(mail.getErrmsg());
        }
        mail.setContent(content);
      */
        return flag;

    }
    
}
